import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:按顺序打印一个数字的每一位
 * (例如 1234 打印出 1 2 3 4) （递归）
 * User: zjc
 * Date: 2022-05-10
 * Time: 23:21
 */
public class Project {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        fac(n);
    }
    public static void fac(int n){
        if(n>9){
            fac(n/10);
        }
        System.out.print(n % 10+" ");
    }
}
